---
# Only the main Sass file needs front matter (the dashes are enough)
---

$blue: #28a8e0;
$green: #6cd25e;
$grey: #555;
$orange: #f59621;
$lightGrey: #edf4f4;
$black: #2e2e2e;

$menuWidth: 250px;


@import "normalize";
@import "mixins";
@import "vendor/highlight/xcode";
@import "carbonads";
@import "menu";
@import "docs";

/* * * * * * * * * * * * * * * * * * * * *
* General
* * * * * * * * * * * * * * * * * * * * */
html {
  font-size: 62.5%;
}

body {
  background-color:#fff;
  font-size:16px;
  font:400 1.6rem/1.4 'source sans pro', 'helvetica neue', helvetica, arial;
  color:$grey;
  padding:0; //80px 0 150px;
}

a {
  color:$blue;
  &:hover {
    color:darken($blue, 10%);
  }
}
p {
  font-size: 16px;
  font-size:1.6rem;
  line-height:1.3;
  strong, b {
    color:darken($grey, 20%);
    font-weight: 500;
  }
}
h1 {
  font-size: 50px;
  font-size: 5rem;
  color:$orange;
  font-weight:400;
  margin:0 0 30px;
}
h2 {
  font-size: 30px;
  font-size:3rem;
  color:$black;
  font-weight:400;
}
h3 {
  font-weight:600;
  font-size:2rem;
  margin-bottom:10px;
  color:$black;
}
h4 {
  font-weight:600;
  font-size: 16px;
  font-size:1.6rem;
  margin-bottom:10px;
  color:$black;
}

.btn {
  font-size: 18px;
  font-size: 1.8rem;
  padding:8px 30px;
  border-radius: 6px;
  border:solid 2px $blue;
  display:inline-block;
  color:$blue;
  text-decoration: none;

  &.btn-primary {
    border-color:$blue;
    background-color: $blue;
    color:#fff;
    font-weight: 500;
    &:hover {
      background-color: darken($blue, 10%);
      color:#eee;
    }
  }
}
.btn:hover {
  text-decoration: none;
  color:darken($blue, 10%);
  border-color:darken($blue, 10%);
}
.donate-form {
  display:inline-block;
  margin-left:5px;
}
.donate {
  border:none;
  background:none;
  padding:0;
  margin:0 10px 0 0;
  float:left;
  span {
    // #gradient > .vertical(#fafafa, #eaeaea);
    border: 1px solid #b7b7b7;
    border-bottom-color: #888;
    display:block;
    padding: 2px 5px 2px 4px;
    color: #111;
    text-decoration: none;
    text-shadow: 0 1px 0 #fff;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 3px;
    font: bold 11px/14px "Helvetica Neue",Helvetica,Arial,sans-serif;
    padding-left:20px;
    position:relative;
    &:hover {
      color:#fff;
      text-decoration: none;
      background-color:$blue;
      text-shadow: 0 1px 0 darken($blue, 20%);
      background-image:none;
      border-color:darken($blue, 10%);
    }
    &:before {
      content:" ";
      display: block;
      background-image: url();

      background-repeat: no-repeat;
      background-size: 14px;
      width:14px;
      height:14px;
      z-index: 1;
      position: absolute;
      left:3px;
      top:3px;
    }
  }
}
.donate-pixel {
  position: absolute;
}

table {
  border-collapse:collapse;
  width:100%;
  margin-bottom:10px;
}
th {
  background-color:rgba(0,0,0,.1);
  border:solid 1px rgba(255,255,255,.1);
  padding:10px 10px;
  text-align:left;
  font-weight: bold;
  color:#ddd
}
td {
  padding:10px 10px;
  border:solid 1px rgba(255,255,255,.1);
}


.example-header {
  margin-bottom:15px;
  h1 {
    margin-bottom:0;
  }
  p {
    margin-top:10px;
  }
}

.continue {
  margin-top: 30px;
  border-top: solid 1px #eee;
  padding-top: 15px;
  text-align: right;
  font-weight: bold;
  color: #222;
}

.footer {
  //position: fixed;
  //bottom:0;
  clear:both;
  width:100%;
  height:20px;
  padding:20px 0;
  background-color:#111;
  text-align: center;
  a {
    color:#fff;
    &:hover {
      color:$lightGrey;
    }
  }
  .misc-share-button {
    display: inline-block;
    height: 20px;
    overflow: hidden;
  }
  .tweet {
    width:100px;
  }
  .facebook {
    width:90px;
    .fb_iframe_widget span {
      vertical-align: top !important;
    }
  }
}

/* * * * * * * * * * * * * * * * * * * * *
* Start page
* * * * * * * * * * * * * * * * * * * * */

.intro {
  @extend %clearfix;
  margin:0 auto;
  max-width: 900px;
  padding:80px;
  box-sizing: border-box;
  .intro-logo {
    text-align: center;
    img {
      max-width: 80%;
    }
    float: left;
    width:30%;
  }
  .intro-text {
    float: left;
    width:70%;
    h1 {
      font-size: 72px;
      font-size: 7.2rem;
      margin: 0 0 1px;
      small {
        font-size: 30px;
        font-size: 3rem;
        color:lighten($grey, 20%);
      }
    }
    h2 {
      font-size: 25px;
      font-size: 2.5rem;
      font-weight: 300;
      margin: 0 0 25px;
      color:lighten($grey, 20%);
      a {
        font-weight: 500;
      }
      em {
        color:darken($grey, 20%);
      }
    }
    .btn {
      margin-right:10px;
    }
  }
}

.misc {
  @extend %clearfix;
  clear:both;
  background-color:$lightGrey;
  padding:30px;
  margin:30px -30px;
  color:#333;
  h3 {
    margin:0 0 5px;
  }
  .misc-share {
    margin-bottom:5px;
  }
  .misc-author {
    .misc-author-pic {
      float:left;
      margin-right:20px;
      border-radius: 5px;
    }
    h4 {
      margin-top:0;
      margin-bottom: 4px;
    }
    p {
      font-size: 14px;
      font-size:1.4rem;
      color:lighten($black, 10%);
      margin-top:0;
      margin-bottom: 10px;
    }
  }
}
// .loaded .misc-carbon:before &  {
//   content:"Everytime you hide an ad... An open source developer goes to go to bed instead of buying a coffee :'(\A <--- Cheat? Donate! :D";
//   white-space: pre-wrap;
//   width:260px;
//   display: block;
//   text-align: center;
//   left:20px;
//   top:20px;
//   position: relative;
//   font-size: 12px;
//   font-size:1.2rem;
//   font-family: monaco, monospace;
// }

.startpage-quotes {
  @extend %clearfix;
  padding:60px 0;
  .startpage-quotes-quote {
    width:33%;
    float:left;
    padding: 0 10px;
    box-sizing: border-box;
  }
}
.startpage-more-examples {
  clear:both;
  ul {
    padding:0 !important;
    margin:0;
  }
  li {
    display:inline-block;
    margin-right:15px;
  }
}

.startpage-examples {
  .startpage-example {
    @extend %clearfix;
    display:none;
    &.active {
      display: block;
    }
  }
}

.annotated-examples {
  h3 {
    margin-top:50px;
  }
}
.columns {
  overflow: hidden;
  padding:0;
  margin:0 -30px 5px;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  overflow: hidden;

  .column {
    padding:20px 30px;
    flex: 1;
    background-color: $lightGrey;
    &:last-child {
      background-color: darken($lightGrey, 2%);
    }
    pre {
      background-color: transparent;
      margin:0;
      padding:0;
    }
  }
}

.annotated-list {
  box-sizing: border-box;
  @extend %clearfix;
  .list {
    padding-top:20px;
    & > div {
      padding:10px 0;
      border-top:solid 1px rgba(255,255,255,.1);
    }
  }
  .avatar {
    max-width: 150px;
    img {
      max-width: 100%;
    }
  }
  h3 {
    font-size:16px;
    font-size: 1.6rem;
    margin:0 0 3px;
    font-weight: bold;
    //color:#fff;
  }
  p {
    margin:0;
    //color:#eee;
  }

  input {
    border-radius: 25px;
    padding:7px 14px;
    background-color: transparent;
    border:solid 1px rgba(0,0,0,.2);
    width:200px;
    box-sizing: border-box;
    color:$black;
    margin-bottom:5px;
  }
  input:focus {
    outline:none;
    border-color:#aaa;
  }
  .sort {
    font-size:12px;
    font-size: 1.2rem;
    padding:5px 15px;
    border-radius: 25px;
    border:none;
    display:inline-block;
    color:$black;
    text-decoration: none;
    background-color: rgba(0,0,0,.05);
    margin:2px 0;
  }
  .sort:hover {
    text-decoration: none;
    background-color: rgba(0,0,0,.1);
  }
  .sort:focus {
    outline:none;
  }
  .sort:after {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid transparent;
    content:"";
    position: relative;
    top:-10px;
    right:-4px;
  }
  .sort.asc:after {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid $black;
    content:"";
    position: relative;
    top:11px;
    right:-4px;
  }
  .sort.desc:after {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid $black;
    content:"";
    position: relative;
    top:-9px;
    right:-4px;
  }
}

/* * * * * * * * * * * * * * * * * * * * *
* Examples
* * * * * * * * * * * * * * * * * * * * */
.nav-tabs {
  .active a {
    background-color: $lightGrey !important;
  }
}



/* * * * * * * * * * * * * * * * * * * * *
* Paging
* * * * * * * * * * * * * * * * * * * * */
.paging {
  padding-bottom:10px;
  clear:both;
  float:left;
}
.paging li {
  display:block;
  float:left;
  padding:10px 15px;
  border-radius:50%;
}
.paging li a {
  color:#999;
  text-decoration:none;
  display:inline-block;
  line-height:14px;
}
.paging li.active a {
  font-weight:bold;
  color:#eee;
  font-size:18px;
  margin:-1px;
}
.paging li a:hover {
  color:#eee;
}

code {
  background-color: $lightGrey;
  border: solid 1px darken($lightGrey, 5%);
  border-radius: 5px;
  padding: 1px 4px;
}
pre {
  padding:30px;
  margin:0;
  line-height:1.7;
  color:#666;
}
pre code {
  padding:0;
  border:none;
  background-color: transparent;
  border-radius: 0;
}

pre, code {
   font-family: monospace, 'monaco', sans-serif;
   font-size: 12px;
   font-size: 1.2rem;
}
pre code .annotation {
  background-color: $orange;
  color: #fff;
  padding: 2px 6px;
  border-radius: 11px;
  cursor:help;
  &:hover {
    background-color:darken($orange, 10%);
  }
}
